import yagmail,logging
def send_mail(filepath):
    mail=yagmail.SMTP(user='77487777@qq.com',passwoed='fjvmkwjdikfbajd',host='smtp.qq.com')
    mail.send(to='77487777@qq.com',subject='孔夫子测试报告',contents="今日报告，请查看",sttachments='filepath')

def log_set():
    logging.basicConfig(filename='./log/kongfzlog.txt',level=logging.DEBUG,filemode='w+',format='%(asctime)s ->%(message)s')
import yaml
def get_data_uaml(fliepath):
    with open(fliepath,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)